// pages/my/desc/desc.js
const app = getApp();
Page({
  data: {
    screenHeight: app.globalData.safearea.height
  },
  onLoad(options) {
    this.loadData(options.name);
  },
  loadData(name) {
    const that = this;
    app.request('/api/question/baseInfo', {}).then(res => {
      console.log(res.data);
      let data = res.data.data.filter((item) => {
        return item.name === name;
      });
      console.log('data 结果', data);
      that.setData({
        item: data[0]
      });
    }).catch(err => {
      console.error(err);
    });
  }
})